package cn.lili.modules.store.mapper;

import cn.lili.modules.store.entity.dos.StoreZft;
import cn.lili.modules.store.entity.vos.StoreZftVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 店铺直付通二级商户数据处理层
 *
 * @author pikachu
 * @since 2022-08-09 14:42:31
 */
public interface StoreZftMapper extends BaseMapper<StoreZft> {

    @Select("select s.*,d.* from li_store_zft s inner join li_store d on d.id=s.store_id where s.id=#{id} ")
    StoreZftVO getDetail(String id);

    @Select("select s.*,d.store_name from li_store_zft as s inner join li_store d on d.id=s.store_id ${ew.customSqlSegment}")
    IPage<StoreZftVO> getList(IPage<StoreZftVO> page, @Param(Constants.WRAPPER) Wrapper<StoreZftVO> queryWrapper);
}
